﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

    /// <summary>
    /// 实体类TB_Exam_ExamRoomMacMapping 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public class TB_Exam_ExamRoomMacMapping : Entity
    {
        public TB_Exam_ExamRoomMacMapping()
            : base("TB_Exam_ExamRoomMacMapping")
        {
        }

        #region Model
        private string _ExamRoomNO;
        private string _MacNo;
        private string _ExamYear;
        /// <summary>
        /// 考场编码
        /// </summary>
        public string ExamRoomNO
        {
            get { return _ExamRoomNO; }
            set
            {
                this.OnPropertyValueChange(_.ExamRoomNO, _ExamRoomNO, value);
                this._ExamRoomNO = value;
            }
        }
        /// <summary>
        /// Mac编码
        /// </summary>
        public string MacNo
        {
            get { return _MacNo; }
            set
            {
                this.OnPropertyValueChange(_.MacNo, _MacNo, value);
                this._MacNo = value;
            }
        }
        /// <summary>
        /// 考试年度
        /// </summary>
        public string ExamYear
        {
            get { return _ExamYear; }
            set
            {
                this.OnPropertyValueChange(_.ExamYear, _ExamYear, value);
                this._ExamYear = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.ExamRoomNO,
				_.MacNo};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.ExamRoomNO,
				_.MacNo,
				_.ExamYear};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._ExamRoomNO,
				this._MacNo,
				this._ExamYear};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._ExamRoomNO = DataUtils.ConvertValue<string>(reader["ExamRoomNO"]);
            this._MacNo = DataUtils.ConvertValue<string>(reader["MacNo"]);
            this._ExamYear = DataUtils.ConvertValue<string>(reader["ExamYear"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._ExamRoomNO = DataUtils.ConvertValue<string>(row["ExamRoomNO"]);
            this._MacNo = DataUtils.ConvertValue<string>(row["MacNo"]);
            this._ExamYear = DataUtils.ConvertValue<string>(row["ExamYear"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Exam_ExamRoomMacMapping");
            /// <summary>
            /// 考场编码
            /// </summary>
            public readonly static Field ExamRoomNO = new Field("ExamRoomNO", "TB_Exam_ExamRoomMacMapping", "考场编码");
            /// <summary>
            /// Mac编码
            /// </summary>
            public readonly static Field MacNo = new Field("MacNo", "TB_Exam_ExamRoomMacMapping", "Mac编码");
            /// <summary>
            /// 考试年度
            /// </summary>
            public readonly static Field ExamYear = new Field("ExamYear", "TB_Exam_ExamRoomMacMapping", "考试年度");
        }
        #endregion


    }
}


